//
//  CachedDownloadManager.h
//  CommunityNannyO2O
//
//  Created by 90 on 15/7/21.
//  Copyright (c) 2015年 Apple. All rights reserved.
//

#import <UIKit/UIKit.h>

#define CachedKeyLocalURL @"CachedKeyLocalURL"

@interface CachedDownloadManager : NSObject
//<CacheItemDelegate>

//@property (nonatomic, assign) id<CachedDownloadManagerDelegate> delegate;

@property (nonatomic, strong) NSMutableDictionary *cacheDictionary;
@property (nonatomic, copy)   NSString *cacheDictionaryPath;

-(NSString *)getDocumentsPath;

-(NSString *)makeDiskCachePath:(NSString*)fullNamespace;

-(NSMutableDictionary *)getCacheDictionary:(NSString *)fileName;

-(NSString *)getCacheDataSavePath:(NSString *)url;

/* 保持缓存字典 */
- (BOOL) saveCacheDictionary;

/* 公有方法：下载 */
- (BOOL)  download:(NSString *)paramURLAsString
urlMustExpireInSeconds:(NSTimeInterval)paramURLMustExpireInSeconds
updateExpiryDateIfInCache:(BOOL)paramUpdateExpiryDateIfInCache;

@end
























